package cn.rulian.one.log.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import cn.rulian.base.common.vo.Result;
import cn.rulian.one.log.dto.OpeLogModel;
import cn.rulian.one.log.service.OpeLogService;

/**
 * Description: 操作日志
 */

@Controller
@RequestMapping("/one/opeLog")
public class OpeLogController {
	@Autowired
	private OpeLogService service;

	/**
	 * 进入列表页面
	 */
	@RequestMapping("/listPage")
	public String listPage() {
		return "/one/log/opeLog_list";
	}

	/**
	 * 查询数据
	 */
	@RequestMapping("/listData")
	@ResponseBody
	public Result listData(OpeLogModel model) {
		return service.query(model);
	}


	/**
	 * 详情页面
	 */
	@RequestMapping("/detailPage")
	public ModelAndView detailPage(ModelAndView mv, Long id) {
		mv.addObject("model", service.findById(id));
		mv.setViewName("/one/log/opeLog_detail");
		return mv;
	}

	/**
	 * 删除
	 */
	@RequestMapping("/delete")
	@ResponseBody
	public void delete(Long ids[]) {
		service.delete(ids);
	}


}
